package com.zhangzhan.exception;

import com.zhangzhan.domain.enums.AppHttpCodeEnum;
import lombok.Data;

/**
 * @author 张一恒
 * @version 1.0
 */
@Data
public class MySystemException extends RuntimeException{

    private int code;

    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public MySystemException(AppHttpCodeEnum httpCodeEnum) {
        super(httpCodeEnum.getMsg());
        this.code = httpCodeEnum.getCode();
        this.msg = httpCodeEnum.getMsg();
    }

}
